using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace donet {
    class Program {
        static void Main (string[] args) {
            // 根目录(bin\Deubg)
            string root = System.Environment.CurrentDirectory;

            //FTPHelper fTP = new FTPHelper ("127.0.0.1", "admin", "123456");

            // fTP.UpLoadFile ("n1207.mp4", "C:\\Data\\n1207.mp4");

            //fTP.BreakPointDownLoadFile ("/n1207.mp4", "C:\\Data\\n1207A.mp4");

            Console.WriteLine ("hello world!");

            FileUpDownload fud = new FileUpDownload ("127.0.0.1", "admin", "123456");

            var exist = fud.ExistInRemote ("/db/wwwroot.rar");
            Console.WriteLine ("wwwroot.rar is" + (exist ? "存在" : "不存在"));

            var exis2t = fud.ExistInRemote ("/db/wwwroot2.rar");
            Console.WriteLine ("wwwroot2.rar is" + (exis2t ? "存在" : "不存在"));

            /*

            fud.FtpUploadBroken ("D:\\Temp\\vs2015.ent_chs.iso", "", new Action<int, int> (
                (int Maximum, int Value) => {
                    //更新进度条
                    //progressBar.Width = Maximum;
                    //progressBar.Value = Value;
                    //Console.WriteLine ("progress:" + Value + " / " + Maximum);

                }));
                */

        }
    }
}